add_executable(qtbug-76766 WIN32 MACOSX_BUNDLE
    main.cpp
)
qt_add_qml_module(qtbug-76766
    URI qtbug_76766
    VERSION ${PROJECT_VERSION}
    QML_FILES
        main.qml
        SceneRoot.qml
        FrameGraph.qml
        PostProcess.qml
        Material1.qml
        Material2.qml
    RESOURCES
        expected_output.png
    NO_RESOURCE_TARGET_PATH
)

target_link_libraries(qtbug-76766 PRIVATE
    Qt${QT_VERSION_MAJOR}::Core
    Qt${QT_VERSION_MAJOR}::Gui
    Qt${QT_VERSION_MAJOR}::Qml
    Qt${QT_VERSION_MAJOR}::Quick
)


# Resources:
set(shaders_resource_files
    "shaders/shader.frag"
    "shaders/shader.vert"
)

qt_add_resources(qtbug-76766 "shaders"
    PREFIX
        "/"
    FILES
        ${shaders_resource_files}
)

install(TARGETS qtbug-76766
    BUNDLE DESTINATION .
    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)

# Consider using qt_generate_deploy_app_script() for app deployment if
# the project can use Qt 6.3. In that case rerun qmake2cmake with
# --min-qt-version=6.3.
